//
// IWriter.hh for caziac in /home/renaud_j//work/zia-2013s-barrau_a/api/Http
// 
// Made by johannick renaud
// Login   <renaud_j@epitech.net>
// 
// Started on  Sat Sep  3 17:31:24 2011 johannick renaud
// Last update Sun Sep 25 17:09:09 2011 johannick renaud
//

#ifndef			CAZIAC_IWRITER_HH
# define		CAZIAC_IWRITER_HH

/**
 *	\file		IWriter.hh
 *	\date		Mon Sep  5 2011
 *	\author		RENAUD J.
 *	\version	2.0
 */

#include		<string>
#include		<vector>

namespace		Caziac
{
  namespace		Tools
  {

    /**
     *	\class		IWriter
     *	\brief          the Writer Interface for file or standart output
     */

    class		IWriter
    {

    public:

      virtual		~IWriter(){}

      /**
       *	\param		str string to fill
       *	\brief		Get a line from the Writer
       *	\warning	If the writer is empty the string will not be changed
       *	\return		the writer modified
       *
       *	This is an example of a Writer uses :
       *
       *	\code
       *	std::string	first = "Star wars" CAZIAC_ENDL;
       *	std::string	second = "come back" CAZIAC_ENDL;
       *
       *	IWriter		*writer = new OutputWriter;
       *	
       *	*writer << first << second;
       *
       *	\endcode
       *
       *	This will print two lines like
       *
       *	"Star wars\r\n"
       *	"come back\r\n"
       */

      virtual IWriter &	operator << (std::string const& str) = 0;
      virtual IWriter &	operator << (std::vector<char> const& buffer) = 0;
    };
  }
}

#endif
